﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using WebLibs;

namespace MDF.DataHelper.DataObject.UsersDO
{
    public class UserRolesDAO : BaseDataObject
    {
        #region Constructor

        public UserRolesDAO()
        {
        }

        public UserRolesDAO(IData _objData)
        {
            this.m_objData = _objData;
        }
        #endregion

        #region Methods

        public DataTable GetAll()
        {
            IData objData = this.m_objData == null ? new IData() : this.m_objData;
            DataTable dtResult = new DataTable();
            try
            {
                objData.Connect();
                objData.CreateNewStoredProcedure("[UserRoles_Select]");
                dtResult = objData.ExecStoreToDataTable();
            }
            catch (Exception ex)
            {
                throw (ex);
            }
            finally
            {
                if (this.m_objData == null) objData.DeConnect();
            }
            return dtResult;
        }

        #endregion
    }
}
